
mui.init();
	var footer = document.getElementById('footer');
	var height1 = document.documentElement.clientHeight || document.body.clientHeight;
	//窗口大小改变时候 解决手机键盘导致布局bug
	window.onresize = function () {
		var height2 = document.documentElement.clientHeight || document.body.clientHeight;
		if (height1 > height2) { 
			footer.style.display = 'none';
		} else {
			footer.style.display = 'block';
		}
	}

	//登录验证
	document.getElementById('login').addEventListener('tap', function () {
		var usernameInput = document.querySelector('input[name="username"]');
		var passwordInput = document.querySelector('input[name="password"]');
		var usernameValue = usernameInput.value;
		var passwordValue = passwordInput.value;
		if (!usernameValue || !passwordValue) {
			mui.toast('用户名或密码不能为空!');
			return;
		}
		
		if (usernameValue === 'admin' && passwordValue === '123456') {
			mui.openWindow('../main/main.html', 'main', 'fade-in');
		} else {
			mui.toast('用户名或密码错误,请重新输入!')
		}
	});